package enum

// OrderStatus 订单状态枚举
type OrderStatus int

const (
	WaitingAccept OrderStatus = iota + 1
	Accepted
	DriverArrived
	UpdateCartInfo
	StartService
	EndService
	Unpaid
	Paid
	Finish
	CancelOrder OrderStatus = -1
	NullOrder   OrderStatus = -100
)

// StatusDescriptions 存储订单状态的描述信息
var StatusDescriptions = map[OrderStatus]string{
	WaitingAccept: "等待接单",
	Accepted:      "已接单",
	DriverArrived: "司机已到达",
	UpdateCartInfo: "更新代驾车辆信息",
	StartService:  "开始服务",
	EndService:    "结束服务",
	Unpaid:        "待付款",
	Paid:          "已付款",
	Finish:        "完成",
	CancelOrder:   "未接单取消订单",
	NullOrder:     "不存在",
}

func (o OrderStatus) Value() int {
	return int(o)
}